﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace _3D_FileExplorer
{
    public partial class FormDiffuseColor : Form
    {
        public FormDiffuseColor()
        {
            InitializeComponent();
        }

        private void FormDiffuseColor_Load(object sender, EventArgs e)
        {
            trackBarR.Value = Fe.par.diffuseColor.R;
            trackBarG.Value = Fe.par.diffuseColor.G;
            trackBarB.Value = Fe.par.diffuseColor.B;
        }

        private void trackBarR_Scroll(object sender, EventArgs e)
        {
            Fe.par.diffuseColor.R = (Byte)trackBarR.Value;
        }

        private void trackBarG_Scroll(object sender, EventArgs e)
        {
            Fe.par.diffuseColor.G = (Byte)trackBarG.Value;

        }

        private void trackBarB_Scroll(object sender, EventArgs e)
        {
            Fe.par.diffuseColor.B = (Byte)trackBarB.Value;
        }

        private void label10_Click(object sender, EventArgs e)
        {
            this.Close();
            Parameters.SerializeToXML(Fe.par);
        }
    }
}
